<%--
  Created by IntelliJ IDEA.
  User: yz168
  Date: 2021/8/31
  Time: 23:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
    <title>产品添加</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css"
          integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css"
          integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous">
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"
            integrity="sha384-aJ21OjlMXNL5UyIl/XNwTMqvzeRMZH2w8c5cRVpzpU8Y5bApTppSuUkhZXN0VxHd" crossorigin="anonymous">
    </script>
</head>
<style>
    .content {
        position: absolute;
        left: calc(50% - 250px);
        margin-top: 30px;
    }
</style>
<body>
    <div class="content">
        <form action="${pageContext.request.contextPath}/doAddProduct.action" method="post">
            <table>
                <tr>
                    <td>产品编号</td>
                    <td><input type="number" name="productId" class="form-control" /></td>
                </tr>
                <tr>
                    <td>产品名称</td>
                    <td><input type="text" name="productName" class="form-control" /></td>
                </tr>
                <tr>
                    <td>进货价格</td>
                    <td><input type="number" name="incomePrice" class="form-control" /></td>
                </tr>
                <tr>
                    <td>销售价格</td>
                    <td><input type="number" name="salesPrice" class="form-control" /></td>
                </tr>
                <tr>
                    <td>商品数量</td>
                    <td><input type="number" name="quantity" class="form-control" /></td>
                </tr>
                <tr>
                    <td>分类</td>
                    <td>
                        <select name="categoryId" class="form-control">
                            <option value="0">--请选择--</option>
                            <c:forEach items="${categorys}" var="category">
                                <option value="${category.categoryId}">${category.categoryName}</option>
                            </c:forEach>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>供应商</td>
                    <td>
                        <select name="providerId" class="form-control">
                            <option value="0">--请选择--</option>
                            <c:forEach items="${providers}" var="provider">
                                <option value="${provider.providerId}">${provider.providerName}</option>
                            </c:forEach>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>进货时间</td>
                    <td><input type="date" name="incomeTime" class="form-control" /></td>
                </tr>
                <tr>
                    <td><input type="submit" name="btnsubmit" class="btn btn-info" value="提交" /></td>
                    <td><input type="reset" name="btnreset" class="btn btn-info" value="重置" /></td>
                </tr>
            </table>
        </form>
    </div>
</body>
</html>
